/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ch3;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author Administrator
 */
@ManagedBean
@SessionScoped
public class Message  {
    String Current="";
    int i=0;
    String[] messages={"Hello World","Hello Java EE","Hello JSF"};

    public String getCurrent() {
        
        return messages[i];
       
    }

   
    public String change(){
         i=(i+1)%3;
         return null;
        
    }

    
}
